import React, { useState } from "react";
import style from "./index.module.scss";
import { useNavigate } from "react-router-dom";
import { Search,  } from "react-vant";
import { Tabs } from "antd-mobile";
import Kpdating from "../../../components/Kpdating";
import Kpcetab from "../../../components/Kpcetab";
import HoemTop2 from '@/components/HoemTop2'
const Index: React.FC = () => {
  const [value, setValue] = useState("");
  const navigate = useNavigate();
  return (
    <div>
      <div className={style.top}>
        <Search
          shape="round"
          background="#fff"
          value={value}
          onChange={setValue}
          placeholder="可输入科普号名字查找"
          //跳转到搜索页面
          onClickInput={() => {
            navigate("/kepuhaodatingsearch");
          }}
        />
      </div>
      <div className={style.content}>
        <Tabs>
          <Tabs.Tab title="发现" key="fruits">
            <Kpdating />
          </Tabs.Tab>
          <Tabs.Tab title="关注" key="vegetables">
            <HoemTop2></HoemTop2>
          </Tabs.Tab>
          <Tabs.Tab title="按专科找" key="animals">
            <Kpcetab />
          </Tabs.Tab>
        </Tabs>
      </div>
    </div>
  );
};

export default Index;
